#!/bin/bash

echo "启动高德地图静态地图应用..."

echo
echo "1. 启动后端服务..."
cd backend
gnome-terminal --title="Backend" -- bash -c "mvn spring-boot:run; exec bash" &
cd ..

echo
echo "2. 等待后端启动完成..."
sleep 10

echo
echo "3. 启动前端服务..."
cd frontend
gnome-terminal --title="Frontend" -- bash -c "npm install && npm run dev; exec bash" &
cd ..

echo
echo "应用启动完成！"
echo "后端地址: http://localhost:8080"
echo "前端地址: http://localhost:3000"
echo
echo "请确保已配置高德地图API Key在 backend/src/main/resources/application.yml 文件中" 